<div style="min-height: 282px">
    <ul class="list">
      <?php if (count($messages)): ?>
      <?php foreach ($messages as $message):?>
        <li>
            <div class="list_main_container <? if(isset($message_id) AND $message_id == $message->id) echo 'active' ?>">
                <img src="<?php echo $message->photo;?>" alt="<?php echo $message->name.' '.$message->surname ?>"/>
                <div class="list_user_link"><a href="/desktop/<?php echo $message->url ?>" class="desktop_link" title="<?php echo __('show desktop')?>"></a><a href="/profile/<?php echo $message->url ?>" class="profile_link" title="<?php echo __('show profile')?>"></a></div>
                <div class="list_standard_entre" style="width:50px"><?php echo $message->direction ? __('From') : __('You to') ?>:</div>
                <a href="/message/bin/<?php echo $message->id ?>" class="message_link">
                <div class="message_row">
                    <p class="mini_name ellipsis_character">
                        <?php echo $message->name.' '.$message->surname ?>
                        
                            <?php if ($message->user_amout > 1): ?>
                                 <span>
                                 <?php echo __(' and :all_users more',array(':all_users' => $message->user_amout-1)); ?>
                                 </span>
                            <?php endif ?>
                       
                    </p>

                    <p class="mini_info ellipsis_word"><span><?php echo $message->subject ?></span> - <?php echo $message->content_message ?></p>
                </div>
                </a>

                <div class="list_standard_entre" style="width: 85px;text-align:center; font-size: 10px"><?php echo   Date::nice_span(strtotime($message->date_created)) ?></div>
                <div class="list_standard_entre"><a href="/message/<?php if(!$message->direction) echo'delete_outbox_message'; else echo'delete_inbox_message' ?>/<?php echo $message->entre_id ?>" class="tooltip delete" title="<?php echo __('delete message')?>" rel="<?php echo __('delete message|Are you realy want delete this message ?|Delete message|Cancel')?>"></a></div>
            </div>
            <div class="message" <?php if(!(isset($message_id) AND $message_id == $message->id)) echo 'style="display:none"'?>>
                <h1><?php echo $message->subject ?></h1>
                <?php echo Text::auto_p($message->content_message) ?>
            </div>
  </li>
      <?php endforeach ?>
      <?php else: ?>
         <li>
            <div class="list_main_container">
                <div class="list_standard_entre" style="text-align: center; float: none"><?php echo __('no messages in bin to show')?></div>                   
            </div>
        </li>
      <?php endif ?>
    </ul>
</div>
